﻿using Sys.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sys.Core.Dri
{
    public class CarBll : ExampleBase<DriCar, CarBll>
    {
        /// <summary>
        /// 排序实体
        /// </summary>
        public IQueryable<DriCar> SortEntities
        {
            get { return Entities.OrderBy(m => m.CarNum); }
        }

        public string GetNumByID(string id)
        {
            string result = string.Empty;
            var car = Entities.FirstOrDefault(m => m.ID == id);
            if(car!=null)
            {
                result = car.CarNum;
            }
            return result;
        }
    }
}
